package com.jimmy.medical.entity;

import com.fasterxml.jackson.annotation.JsonBackReference;
import org.apache.commons.lang.StringUtils;
import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import javax.persistence.*;
import java.math.BigDecimal;

/**
 * 工单操作日志
 *
 * @author jimmy
 * @since 0.1
 */
@Entity
@Table(name = "flow_order_log")
public class FlowOrderLog extends AbstractEntity {
    /**
     * 内容
     */
    @Column(name = "content", length = 100)
    private String content;

    /**
     * 操作人
     */
    @Column(name = "handle_user", length = 50)
    private String handleUser;

    /**
     * 处理时限
     **/
    @Column(name = "time_limit", length = 32)
    private String timeLimit;

    /**
     * 完成时间
     **/
    @Column(name = "time_finish", length = 32)
    private String timeFinish;

    /**
     * 所属工单
     */
    @JsonBackReference
    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "flow_order_id")
    @NotFound(action = NotFoundAction.IGNORE)
    private FlowOrder flowOrder;

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getHandleUser() {
        return handleUser;
    }

    public void setHandleUser(String handleUser) {
        this.handleUser = handleUser;
    }

    public String getTimeLimit() {
        return timeLimit;
    }

    public void setTimeLimit(String timeLimit) {
        this.timeLimit = timeLimit;
    }

    public String getTimeFinish() {
        return timeFinish;
    }

    public void setTimeFinish(String timeFinish) {
        this.timeFinish = timeFinish;
    }

    public FlowOrder getFlowOrder() {
        return flowOrder;
    }

    public void setFlowOrder(FlowOrder flowOrder) {
        this.flowOrder = flowOrder;
    }
}
